package com.wanmait.myhouse.util;
import com.alibaba.druid.pool.DruidDataSource;
public class DBHelper {
    private static DruidDataSource druidDataSource;
    public static DruidDataSource getDruidDataSource(){
        return druidDataSource;
    }
    static {
        druidDataSource = new DruidDataSource();
        druidDataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
        druidDataSource.setUrl("jdbc:mysql://database-1.cpeweeis2sdg.rds.cn-north-1.amazonaws.com.cn:3306/wm241017db1?serverTimezone=Asia/Shanghai&characterEncoding=utf-8&useSSL=false");
        druidDataSource.setUsername("wm241017user1");//数据库用户名
        druidDataSource.setPassword("wanmait_2U8Ef8");//数据库密码
        druidDataSource.setInitialSize(3);
        druidDataSource.setMinIdle(3);
        druidDataSource.setMaxActive(20);
        druidDataSource.setMaxWait(10000);
    }
}
